﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BAL.Entities;
using BAL.Utils;
using System.Data;
using DAL.LogicComponents;

namespace BAL.Components
{
    public class clsCategoryBAL
    {
        #region --- Category List
        public static DataTable doCategorySelectList()
        {
            try
            {
                return clsCategoryDAL.querySelectCategoryList();
            }
            catch
            {
                throw;
            }
        }

        #endregion

        #region --- Category List by id
        public static DataTable doCategorySelectListById(clsCategory obj)
        {
            try
            {
                return clsCategoryDAL.querySelectCategoryListByID(obj);
            }
            catch
            {
                throw;
            }
        }

        #endregion

        #region --- Update Category by User
        public static bool doUpdateCategory(clsCategory obj)
        {
            try
            {
                return clsCategoryDAL.queryUpdateCategory(obj);
            }
            catch
            {
                throw;
            }
        }

        #endregion

        #region --- Add Category by User
        public static bool doAddNewCategory(clsCategory obj)
        {
            try
            {
                return clsCategoryDAL.queryAddCategory(obj);
            }
            catch
            {
                throw;
            }
        }

        #endregion
    }
}